﻿using ImGuiNET;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

//LogWindow();
//todo
//1.将扩展分为Editor 和 User
//3.实现 Unity风格不停机c#扩展 （User层）
//3.实现 3DRT画面嵌入
//基于c#来做这些事情还是很容易的



namespace FakeUnity
{

    static class Program
    {
        // public const string nativelib = "TTEngine.Native";

        // //所有字符串接口统一使用utf16,如需转换 c++侧处理
        // [DllImport(nativelib, CallingConvention = CallingConvention.Cdecl)]
        // public unsafe static extern int App_MainLoop(char* title, Action onInit, Action onUpdate, Action onGUI, Action onExit);


        unsafe static void Main(string[] args)
        {
            Console.WriteLine("Fake Unity Begin");
            FakeUnity.Warp.FrameworkNative.APP_SetLogger(OnLog);
            Editor.Editor.Run();
        }
        static unsafe void OnLog(char* text)
        {
            string str = new string(text);
            Console.WriteLine("Log:" + str);
        }

    }
}
